# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Ionut Biru <ionut@archlinux.ro>
# Contributor: WAntilles <wantilles@adslgr.com>

pkgname=opencore-amr
pkgver=0.1.5
pkgrel=5
pkgdesc="Open source implementation of the Adaptive Multi Rate (AMR) speech codec"
arch=('x86_64')
license=('Apache')
url="https://sourceforge.net/projects/opencore-amr/"
source=("https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
depends=('glibc')
provides=('libopencore-amrwb.so' 'libopencore-amrnb.so')
sha512sums=('c324db9dcac5a31bfac633153bc054bfe42d5ff98202c4adb3c75a3fae9792f07f60d48cd659acf106dacd307174a62b2aeee22a4af53caa20d2bfba46488faf')
b2sums=('4943a27f0df3d874720c87f48c523d9aa4cce849dd0a3c9183466416a0629aa02dac8f01646e469e8c45438bf3c57047eb11e69f3f1b261449a0989a36639e59')

prepare() {
  cd "$pkgname-$pkgver"
  autoreconf -vfi
}

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr \
              --disable-static \
              --enable-examples
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  install -vDm 644 {ChangeLog,README} -t "${pkgdir}/usr/share/doc/${pkgname}"
}

